package cn.e4j.modular.api.service;

import cn.e4j.core.dto.impl.Dto;
import cn.e4j.core.util.AppCxt;
import cn.e4j.modular.api.mapper.GweMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by wenchuan on 2018/10/31.
 * <p>
 * gwe开头的表操作的公共方法
 */

@Service
public class GweService{

    @Autowired
    GweMapper gweMapper;


    /*
    * getGwe001 获取月汇率 根据客户上的默认币别
    * getGwe002 获取日汇率 根据客户上的默认币别
    * */

    /**
     * 获取月汇率
     *
     * @param inDto
     * @return
     * @author wenchuan.li on 2018/10/31 17:01
     */
    public Dto getGwe001(Dto inDto) {
        inDto.put("GWEKENT",inDto.getString("ENT"));
        inDto.put("GWEK104", AppCxt.getParam("sys_currency_"));
        return gweMapper.getGwe001(inDto);
    }


    /**
     * 获取月汇率
     *
     * @param inDto
     * @return
     * @author wenchuan.li on 2018/10/31 17:21
     */
    public Dto getGwe002(Dto inDto) {
        inDto.put("GWELENT",inDto.getString("ENT"));
        inDto.put("GWEL104", AppCxt.getParam("sys_currency_"));
        return gweMapper.getGwe002(inDto);
    }



}
